//package com.ruoyi.kindergarten.config;
//
//
//import com.ruoyi.kindergarten.websocket.WebSocketService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.socket.WebSocketHandler;
//import org.springframework.web.socket.config.annotation.*;
//
//
//@Configuration
//@EnableWebSocket
//public class WebSocketConfigs implements WebSocketConfigurer {
//
//
//
//
//    @Override
//    public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
//        //连接websocket测试
//        registry.addHandler((WebSocketHandler) new WebSocketService(), "/wx")
//                .setAllowedOrigins("*").setAllowedOriginPatterns("https://example.com", "http://localhost:8080");
//    }
//
//}